package com.yumis.service.modules.car.controller;

import com.yumis.service.common.enums.HttpState;
import com.yumis.service.common.vo.Response;
import com.yumis.service.model.pojo.CarAscription;
import com.yumis.service.model.pojo.CarBrand;
import com.yumis.service.modules.car.service.CarAscriptionService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

@Slf4j
@RestController
@RequestMapping("carascription")
public class CarAscriptionController {
    @Autowired
    private CarAscriptionService carAscriptionService;

    /**
     * 分页查询所有信息
     * @param
     * @return
     */
    @GetMapping("queryCarAscription")
    public ResponseEntity<Response> queryCarAscription(){
        return ResponseEntity.ok().body(Response.buildResponse(HttpState.OK,carAscriptionService.queryCarAscription()));
    }
}
